import org.junit.Test;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class test {
    @Test
    public void test1(){
        String path = Thread.currentThread().getContextClassLoader().getResource("").getPath();
        System.out.println(path);
        File file = new File(path);
        /*list()方法是返回某个目录下的所有文件和目录的文件名，返回的是String数组
        listFiles()方法是返回某个目录下所有文件和目录的绝对路径，返回的是File数组*/
        String[] list = file.list();
        for (String s : list)
            System.out.println(s);
      //  File[] files = file.listFiles();

    }

    @Test
    public void test2(){
    /*    String t[]={"all","lisa"};
        System.out.println(String.join(";",t));*/
        List<String> list=new ArrayList<>();
        list.add("lisa");
        list.add("lisa1");
        System.out.println(
                list.contains("l2isa")
        );

    }
}
